package cn.bandeqing.base.util;

import org.dromara.hutool.crypto.digest.DigestUtil;

public class PasswordUtil {

//    public static void main(String[] args) {
//        System.out.println(DigestUtil.md5Hex("admin" + "admin123" + "786539"));
//    }

    /**
     * 返回加密后的密码
     *
     * @param loginName admin
     * @param password  admin123
     * @param salt      786539
     * @return ec12fbe14fcc5f810b1cb1d4c6d66cf7
     */
    public static String pwdSalt(String loginName, String password, String salt) {
        return DigestUtil.md5Hex(loginName + password + salt);
    }

}
